import request from '@/utils/request'

// 名字分页模糊查询
export function getTeacherList(data) {
  return request({
    url: `/teacher/page?keyword=${data.keyword}&limit=${data.limit}&page=${data.page}`,
    method: 'get'
  })
}

// 添加
export function addteacherList(data) {
  return request({
    url: '/teacher/addTeacher',
    method: 'post',
    data
  })
}

// 删除老师
export function deleteteacherList(data) {
  return request({
    url: `/teacher/deleteTeacher?teacherId=${data.teacherId}`,
    method: 'post'
  })
}

// 批量删除
export function deleteteachetLists(data) {
  return request({
    url: `/teacher/deleteTeachers?teacherIds=${data.item}`,
    method: 'post'
  })
}

// 更新老师
export function updateteacherList(data) {
  return request({
    url: '/teacher/updateTeacherBackstage',
    method: 'post',
    data
  })
}
